package com.xiaoshuidi.cloud.module.finance.dal.redis;

import com.xiaoshuidi.cloud.framework.redis.core.RedisKeyDefine;
import org.redisson.api.RLock;

/**
 * 支付 Redis Key 枚举类
 *
 * 
 */
public interface RedisKeyConstants {

    RedisKeyDefine PAY_NOTIFY_LOCK = new RedisKeyDefine("通知任务的分布式锁",
            "pay_notify:lock:", // 参数来自 DefaultLockKeyBuilder 类
            RedisKeyDefine.KeyTypeEnum.HASH, RLock.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC); // Redisson 的 Lock 锁，使用 Hash 数据结构
    RedisKeyDefine RECHARGE_LOCK = new RedisKeyDefine("账户充值锁", "account_recharge:lock:%s:%s",
            RedisKeyDefine.KeyTypeEnum.HASH, RLock.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC);

    RedisKeyDefine ACCOUNT_LOCK = new RedisKeyDefine("账户锁", "account:lock:%s:%s",
            RedisKeyDefine.KeyTypeEnum.HASH, RLock.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC);

}
